home *** CD-ROM | disk | FTP | other *** search
/ Compute! Gazette 1994 July / 1994-07b.d64 / golf scores (.txt) < prev    next >
Commodore BASIC  |  2022-09-20  |  444b  |  22 lines

  1. 10 print"[147][144]assuming 18-hole course"
  2. 20 input"first round";r1
  3. 30 ifr1<>int(r1)thengosub200:goto20
  4. 40 z=r1:gosub300
  5. 50 input"second round";r2
  6. 60 ifr2<>int(r2)thengosub200:goto50
  7. 70 z=r2:gosub300
  8. 80 input"third round";r3
  9. 90 ifr3<>int(r3)thengosub200:goto80
  10. 100 z=r3:gosub300
  11. 110 ts=r1+r2+r3:print"total shots for 3 rounds:"ts
  12. 120 n=ts/54
  13. 130 r=int(n+.5)
  14. 140 print:print"avg.shots per hole for 3 rounds:"r
  15. 150 end
  16. 200 print:print"no decimals, please!"
  17. 210 print:return
  18. 300 n=z/18
  19. 310 r=int(n+.5)
  20. 320 print:print"avg. shots per hole:"r
  21. 330 print:return
  22.